package application

import (
	"github.com/gin-gonic/gin"
	"ruoyi/domain/entity/common"
	"ruoyi/domain/entity/monitor"
	"ruoyi/domain/entity/response"
	"ruoyi/domain/repository"
)

type OperationLogApp struct {
	operation repository.SysOperationLogRepository
}

var _ OperationLogAppInterface = &OperationLogApp{}

type OperationLogAppInterface interface {
	SelectOperationLogList(params common.SearchTableDataParam) common.TableDataInfo
	DeleteOperationLog(operIds []int) response.Response
	ClearOperationLog() response.Response
	OperationLogAdd(context *gin.Context, param monitor.SysOperLog) response.Response
}

func (o *OperationLogApp) SelectOperationLogList(params common.SearchTableDataParam) common.TableDataInfo {
	return o.operation.SelectOperationLogList(params)
}

func (o *OperationLogApp) DeleteOperationLog(operIds []int) response.Response {
	return o.operation.DeleteOperationLog(operIds)
}

func (o *OperationLogApp) ClearOperationLog() response.Response {
	return o.operation.ClearOperationLog()
}

func (o *OperationLogApp) OperationLogAdd(context *gin.Context, param monitor.SysOperLog) response.Response {
	return o.operation.OperationLogAdd(context, param)
}
